<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>BFFFO Instruction</title>
<link href="../edit68k.css" rel="stylesheet" type="text/css">
</head>

<body>
<h1 class="heading">BFFFO Instruction<BR>
<hr noshade></h1>
<P align=left><BR>
  <span class="text">This instruction searches for the most significant bit 
position that contains a 1. The bit position (the original bit offset plus the 
offset of the first 1 bit) of that bit is placed in Dn. If no bit of the bit 
field is 1, the value placed in Dn is the field offset plus field width. The 
condition codes are set according to the value in the field.<BR>
  <BR>
  ADDRESS METHODS: Dn, (An), x(An), x(An,xr.s), x.w, x.l, x(PC), x(PC,xr.s)<BR>
  <BR>
  DATA LENGTH: Unsized</span></P>
        <TABLE border=0 cellPadding=0 cellSpacing=0 width="67%" id="table1">
          <TBODY>
            <TR>
              <TD width="12%" rowSpan=5 class="text">FLAGS:</TD>
              <TD width="88%" class="text">X - Not affected</TD>
            </TR>
            <TR>
              <TD width="88%" class="text"><span class="text">N - Set if the 
				most significant bit of the field is set. Cleared otherwise.</span></TD>
            </TR>
            <TR>
              <TD width="88%" class="text"><span class="text">Z - Set if all 
				bits of the field are zero. Cleared otherwise.</span></TD>
            </TR>
            <TR>
              <TD width="88%" class="text">V - Always cleared.</TD>
            </TR>
            <TR>
              <TD width="88%" class="text">C - Always cleared.</TD>
            </TR>
          </TBODY>
        </TABLE>
        <P align=left>&nbsp;</P>
        <TABLE border=0 cellPadding=0 cellSpacing=0 width="67%">
          <TBODY>
            <TR>
              <TD width="22%" class="text">SYNTAX:</TD>
              <TD width="78%" class="text">BFFFO &lt;ea&gt;{offset:width},Dn</TD>
            </TR>
          </TBODY>
        </TABLE>
        <span class="text">
  </span>
<p>
  <span class="text">The field selection is specified by a field offset and 
field width. The field offset denotes the starting bit of the field.. The field 
width determines the number of bits to be included in the field. The offset and 
width fields may be specified with an immediate operand ('#' is optional) or a 
data register. If the offset is an immediate operand the value must be in the 
range 0-31. If the offset is a data register the value is in the range -2<sup>31</sup> 
to 2<sup>31</sup>-1. If the width is an immediate operand the value is in the 
range 1-31 or 0 to specify a width of 32. If the width is a data register the 
value is taken modulo 32, with values 1-31 or 0 to specify a width of 32.&nbsp; 
	Bit 0 is the most significant bit.</span></p>
<P class="sourcecode"><span class="text"><font face="Courier New">&nbsp;&nbsp; BFFFO&nbsp;&nbsp;&nbsp; 
$1000{2,10},D1&nbsp;&nbsp;&nbsp; finds the first 1 bit in the bits from $1000 
bit 2 through $1000 bit 12 and put in D1</font></span></P>
</body>
</html>
